<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>确认框演示</title>
    <link rel="stylesheet" href="css/styles.css">
    <style>
        .demo-container {
            max-width: 600px;
            margin: 100px auto;
            padding: 20px;
        }
        .demo-buttons {
            display: flex;
            gap: 20px;
            justify-content: center;
            margin-top: 30px;
        }
    </style>
</head>
<body>
    <div class="demo-container">
        <div class="card">
            <h2 class="card-title">自定义确认框演示</h2>
            <p>点击下面的按钮测试自定义确认框功能：</p>
            
            <div class="demo-buttons">
                <button class="btn btn-success" id="adopt-btn">采用技术主题</button>
                <button class="btn btn-secondary" id="ignore-btn">忽略技术主题</button>
            </div>
        </div>
    </div>

    <!-- 自定义确认对话框 -->
    <div id="confirm-modal" class="confirm-modal" style="display: none;">
        <div class="confirm-modal-content">
            <div class="confirm-modal-header">
                <h3 class="confirm-modal-title">操作确认</h3>
            </div>
            <div class="confirm-modal-body" id="confirm-modal-message">
                确定要执行此操作吗？
            </div>
            <div class="confirm-modal-footer">
                <button class="confirm-modal-btn confirm-modal-btn-cancel" id="confirm-modal-cancel">取消</button>
                <button class="confirm-modal-btn confirm-modal-btn-confirm" id="confirm-modal-confirm">确定</button>
            </div>
        </div>
    </div>

    <script src="js/app.js"></script>
    <script>
        // 演示用的事件监听器
        document.addEventListener('DOMContentLoaded', function() {
            const adoptBtn = document.getElementById('adopt-btn');
            const ignoreBtn = document.getElementById('ignore-btn');
            
            adoptBtn.addEventListener('click', function() {
                showConfirmModal('确定要采用"人工智能芯片"技术主题吗？确认之后该技术将加入技术目录中。', function() {
                    alert('已采用"人工智能芯片"技术主题');
                });
            });
            
            ignoreBtn.addEventListener('click', function() {
                showConfirmModal('确定要忽略"区块链技术"技术主题吗？确认之后该记录将被删除。', function() {
                    alert('已忽略"区块链技术"技术主题');
                });
            });
        });
    </script>
</body>
</html>